/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* 轮播图样式 */
.banner {
    height: 400px;
    position: relative;
    margin: 2rem 0;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 商品列表样式 */
.products h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #2c3e50;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.product-price {
    font-weight: bold;
    color: #e74c3c;
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.product-description {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.add-to-cart {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

/* 页脚样式 */
footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* 登录模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #27ae60;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
}

/* 认证页面样式 */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #34495e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.form-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.form-options input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.submit-btn {
    padding: 0.75rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #27ae60;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.terms {
    margin-top: 1rem;
}

.terms a {
    color: #3498db;
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

/* 提示信息样式 */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
}

/* 头部导航样式 */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul li {
    padding: 15px;
}

#cart-count {
    background-color: #ff4500;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 5px;
}

/* 个人中心主体样式 */
.profile-container {
    display: flex;
    gap: 20px;
}

.profile-menu {
    flex: 1;
    max-width: 220px;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profile-menu a {
    display: block;
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.profile-menu a.active {
    background-color: #007bff;
    color: white;
}

.profile-content {
    flex: 4;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 用户信息样式 */
.user-info {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

#user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

/* 订单样式 */
.order-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.order-header {
    background-color: #f8f9fa;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.order-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.order-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.order-status.processing {
    background-color: #cce5ff;
    color: #004085;
}

.order-status.shipped {
    background-color: #d1ecf1;
    color: #0c5460;
}

.order-status.completed {
    background-color: #d4edda;
    color: #155724;
}

.order-status.cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.order-details {
    padding: 15px;
}

.order-items-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.order-item-preview {
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-item-preview img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.order-actions a {
    padding: 5px 10px;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: 14px;
}

.order-actions a:hover {
    background-color: #007bff;
    color: white;
    text-decoration: none;
}

.empty-orders {
    text-align: center;
    padding: 40px 0;
}

/* 地址样式 */
.address-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.address-card.default {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.default-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.address-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.address-actions button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
}

.address-actions button:hover {
    background-color: #f8f9fa;
}

.no-address {
    text-align: center;
    padding: 20px 0;
    color: #666;
}

#address-form-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    display: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* 密码修改样式 */
#password-form-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    display: none;
}

/* 提示框样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* 筛选按钮样式 */
.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: white;
}

.filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
    }
    
    .profile-menu {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .order-header,
    .order-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}    

/* 订单流程样式 */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.checkout-steps .step {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    color: #95a5a6;
    position: relative;
}

.checkout-steps .step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: #ecf0f1;
    z-index: -1;
}

.checkout-steps .step.active {
    color: #2ecc71;
    font-weight: bold;
}

.checkout-steps .step.active:after {
    background-color: #2ecc71;
}

/* 订单确认页样式 */
.order-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.order-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.order-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.order-section h2 i {
    margin-right: 0.5rem;
    color: #3498db;
}

.edit-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
}

.edit-btn:hover {
    text-decoration: underline;
}

#shipping-info p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.payment-option {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.payment-option:hover {
    border-color: #3498db;
}

.payment-option input {
    margin-right: 0.5rem;
}

.payment-option label {
    cursor: pointer;
}

.order-items {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.order-item {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.item-price {
    color: #e74c3c;
    font-weight: bold;
}

.item-quantity {
    text-align: center;
    color: #7f8c8d;
}

.item-total {
    text-align: right;
    font-weight: bold;
}

.order-summary {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 1rem;
}

.order-summary h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.order-summary h2 i {
    margin-right: 0.5rem;
    color: #3498db;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.coupon-section {
    display: flex;
    margin: 1.5rem 0;
}

#coupon-code {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.apply-btn {
    padding: 0 1.5rem;
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.apply-btn:hover {
    background-color: #e67e22;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 1rem;
}

.submit-btn:hover {
    background-color: #27ae60;
}

.secure-checkout {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.secure-checkout i {
    color: #2ecc71;
    margin-right: 0.3rem;
}

/* 订单完成页样式 */
.order-complete-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.complete-icon svg {
    width: 48px;
    height: 48px;
    color: white;
}

.order-complete-container h1 {
    color: #2ecc71;
    margin-bottom: 1rem;
}

.order-number {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #34495e;
}

.order-summary {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.summary-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.view-order {
    background-color: #3498db;
    color: white;
}

.view-order:hover {
    background-color: #2980b9;
}

.continue-shopping {
    background-color: #ecf0f1;
    color: #34495e;
}

.continue-shopping:hover {
    background-color: #bdc3c7;
}

.customer-service {
    margin-top: 2rem;
    color: #7f8c8d;
}

.customer-service a {
    color: #3498db;
    text-decoration: none;
}

.customer-service a:hover {
    text-decoration: underline;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* 轮播图样式 */
.banner {
    height: 400px;
    position: relative;
    margin: 2rem 0;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-prev,
.banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
}

.banner-prev {
    left: 10px;
}

.banner-next {
    right: 10px;
}

/* 商品列表样式 */
.products h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #2c3e50;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.product-price {
    font-weight: bold;
    color: #e74c3c;
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.product-description {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.add-to-cart {
    display: block;
    width: 100%;
    padding: 0.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

/* 页脚样式 */
footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

#toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 100;
    transition: opacity 0.3s;
    display: none;
}